home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / DTS Sample Code / Apple II Sample Code / MPW IIGS SC / SC.014.FontReport / fontreport.r < prev    next >
Encoding:
Text File  |  1990-06-23  |  6.3 KB  |  268 lines  |  [TEXT/MPS ]

  1. /*---------------------------------------------------------------*/
  2.  
  3. /* "hd:mpw:riigsincludes:typesiigs.r"   */
  4. #include "typesiigs.r" 
  5.  
  6. /*------------------- Values used through out -------------------*/
  7.  
  8. #define CatalogWindow    $1000
  9. #define StrikeWindow    $1001
  10.  
  11.  
  12. /*----------------------- About Box ------------------------------*/
  13. resource rAlertString (1) {
  14.     "0\$19\$00\$A0\$00\$AA\$00\$E0\$01"
  15.     "0/"
  16.     TBCenterJust
  17.     TBStyleOutline
  18.     "Font Report"
  19.     TBEndOfLine
  20.     TBStylePlain
  21.     "A sample program to demonstrate program calls to the Apple IIGS Font Manager."
  22.     TBEndOfLine
  23.     TBEndOfLine
  24.     "by"
  25.     TBEndOfLine
  26.     "Dan Strnad"
  27.     TBEndOfLine
  28.     TBEndOfLine
  29.     "Copyright Apple Computer, Inc."
  30.     TBEndOfLine
  31.     "All Rights Reserved"
  32.     TBEndOfLine
  33.     "Version 3.0/^#6\$00"
  34. };
  35.  
  36.  
  37.  
  38.  
  39. /*----------------------Startup Record ---------------------------*/
  40. resource rToolStartup (1)    {
  41.     mode640,                            /* master SCB */
  42.     {     
  43.         3,$0300,    /* misc tools */
  44.         4,$0301,    /* quickdraw */
  45.         5,$0302,    /* desk manager */
  46.         6,$0300,    /* eventMgr */
  47.         7,$0200,    /* scheduler */
  48. /*        8,$0301,    /* sound tools */
  49. /*        9,$0201,    /* ADB tools */
  50.         10,$0202,    /* SANE */
  51.         11,$0200,    /* int math */
  52.         12,$0201,    /* Text Tool Set */
  53.         14,$0301,    /* Window Manager */
  54.         15,$0301,    /* Menu Manager */
  55.         16,$0301,    /* Control Manager */
  56.         17,$0300,    /* System Loader */
  57.         18,$0301,    /* QD Aux */
  58. /*        19,$0300,    /* print manager */
  59.         20,$0301,    /* LineEdit tool set */
  60.         21,$0302,    /* Dialog Manager */
  61.         22,$0300,    /* Scrap manager */
  62.         23,$0301,    /* standard file */
  63. /*        25,$0104,    /* NoteSynth */
  64. /*        26,$0104,    /* Note Seq */
  65.         27,$0301,    /* Font manager */
  66.         28,$0301,    /* list manager */
  67. /*        29,$0101,    /* ACE */
  68. /*        32,$0103,    /* Midi Tools */
  69. /*        34,$0101    /* text edit */
  70.     }
  71. };
  72.  
  73.  
  74.  
  75. /*---------------------------------------------------------------------------*/
  76. /*
  77. /* Font Catalog Window
  78. /*
  79. /* This is the template for the font catalog window
  80. /*
  81. /*---------------------------------------------------------------------------*/
  82. resource rWindParam1 (CatalogWindow) {
  83.     0xdda0,                                                    /* Frame Bits             */
  84.     0x201,                                                    /* title ID               */
  85.     0,                                                        /* ref Con                */
  86.     {0,0,0,0},                                                /* Zoom Rect              */
  87.     0,                                                        /* color table id         */
  88.     {0,0},                                                    /* origin                 */
  89.     {800,640},                                                /* data size             */
  90.     {0,0},                                                    /* max height-width        */
  91.     {4,16},                                                    /* scroll amount, hor,ver */
  92.     {40,160},                                                /* page amount */
  93.     0,                                                        /* wInfo Ref Con */
  94.     0,                                                        /* wInfo height */
  95.     {25,20,170,500},                                        /* window Position */
  96.     0xffffffff,                                                /* wPlane */
  97.     Nil,                                                    /* Control Ref */
  98.     refIsResource*0x0100+resourceToResource                 /* descriptor */
  99. };
  100.  
  101. /*---------------------------------------------------------------------------*/
  102. /* This is the title of the font catalog window
  103. /*---------------------------------------------------------------------------*/
  104. resource rPString (0x201) {
  105.     "Font Catalog"
  106.     };
  107.  
  108.  
  109.  
  110. /*---------------------------------------------------------------------------*/
  111. /*
  112. /* Font Strike Window
  113. /*
  114. /* This is the template for the font strike window
  115. /*
  116. /*---------------------------------------------------------------------------*/
  117. resource rWindParam1 (StrikeWindow) {
  118.     0xdda0,                                                    /* Frame Bits             */
  119.     0x202,                                                    /* title ID               */
  120.     0,                                                        /* ref Con                */
  121.     {0,0,0,0},                                                /* Zoom Rect              */
  122.     0,                                                        /* color table id         */
  123.     {0,0},                                                    /* origin                 */
  124.     {800,640},                                                /* data size             */
  125.     {0,0},                                                    /* max height-width        */
  126.     {4,16},                                                    /* scroll amount, hor,ver */
  127.     {40,160},                                                /* page amount */
  128.     0,                                                        /* wInfo Ref Con */
  129.     0,                                                        /* wInfo height */
  130.     {45,213,180,550},                                        /* window Position */
  131.     0xffffffff,                                                /* wPlane */
  132.     Nil,                                                    /* Control Ref */
  133.     refIsResource*0x0100+resourceToResource                 /* descriptor */
  134. };
  135.  
  136.  
  137. /*---------------------------------------------------------------------------*/
  138. /* This is the title of the font strike window
  139. /*---------------------------------------------------------------------------*/
  140. resource rPString (0x202) {
  141.     "Font Strike"
  142.     };
  143.  
  144.  
  145.  
  146. /* *************************************************************************  */
  147. /*
  148. /*             Menus
  149. /*
  150. /* This sample program uses menu items that start at 250. The Edit menu items */
  151. /* if they were present would be entered first to conform to the menu manager */
  152. /* documentation. The About and Quit menu items use IDs 256 and 257 as a      */
  153. /* convention.                                                                   */
  154. /*                                                                              */
  155. /* *************************************************************************  */
  156.  
  157. #define AppleMenuID            $1100
  158. #define AboutID                $1101
  159. #define FileMenuID            $1200
  160. #define OpenCatWindowID        $1201
  161. #define OpenStrikeWindowID    $1202
  162. #define QuitID                257
  163. #define FontMenuID            $1300
  164. #define ChooseID            $1301
  165.  
  166.  
  167.  
  168. resource rMenuBar (1) {
  169.     {
  170.         AppleMenuID,
  171.         FileMenuID,
  172.         FontMenuID
  173.     };
  174. };
  175.  
  176. resource rMenu (AppleMenuID)    {
  177.     AppleMenuID,
  178.      RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  179.     AppleMenuID,
  180.     { AboutID };
  181. };
  182.  
  183. resource rMenu (FileMenuID)    {
  184.     FileMenuID,
  185.      RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  186.     FileMenuID,
  187.     { OpenCatWindowID,
  188.     OpenStrikeWindowID,
  189.     QuitID };
  190. };
  191.  
  192. resource rMenu (FontMenuID)    {
  193.     FontMenuID,
  194.      RefIsResource*MenuTitleRefShift+RefIsResource*ItemRefShift+fAllowCache,
  195.     FontMenuID,
  196.     { ChooseID };
  197. };
  198.  
  199. resource rMenuItem (AboutID)    {
  200.     AboutID,
  201.     "","",
  202.     0,
  203.      RefIsResource*ItemTitleRefShift+fDivider,
  204.     AboutID
  205. };
  206.  
  207. resource rMenuItem (OpenCatWindowID)    {
  208.     OpenCatWindowID,
  209.     "","",
  210.     0,
  211.     RefIsResource*ItemTitleRefShift+fDisabled,
  212.     OpenCatWindowID
  213. };
  214.  
  215. resource rMenuItem (OpenStrikeWindowID)    {
  216.     OpenStrikeWindowID,
  217.     "","",
  218.     0,
  219.     RefIsResource*ItemTitleRefShift+fDisabled,
  220.     OpenStrikeWindowID
  221. };
  222.  
  223. resource rMenuItem (QuitID)    {
  224.     QuitID,
  225.     "Q","q",
  226.     0,
  227.      RefIsResource*ItemTitleRefShift,
  228.     QuitID
  229. };
  230.  
  231. resource rMenuItem (ChooseID)    {
  232.     ChooseID,
  233.     "C","c",
  234.     0,
  235.      RefIsResource*ItemTitleRefShift,
  236.     ChooseID
  237. };
  238.  
  239.  
  240. resource rPString (AppleMenuID) {
  241.     "@"
  242.     };
  243. resource rPString (FileMenuID) {
  244.     "  File  "
  245.     };
  246. resource rPString (FontMenuID) {
  247.     "  Font  "
  248.     };
  249. resource rPString (AboutID) {
  250.     "About Font Report..."
  251.     };
  252. resource rPString (OpenCatWindowID) {
  253.     "Open Font Catalog Window"
  254.     };
  255. resource rPString (OpenStrikeWindowID) {
  256.     "Open Font Strike Window"
  257.     };
  258. resource rPString (QuitID) {
  259.     "Quit"
  260.     };
  261. resource rPString (ChooseID) {
  262.     "Choose..."
  263.     };
  264.  
  265.  
  266.  
  267.  
  268.